from fastapi import FastAPI
from fastapi.middleware.cors import CORSMiddleware

from app.api.endpoints import kb_chat, chat, interview,ipchat,resumeEvaluate,intelligentInput,Login,jobMatch

app = FastAPI(
    title="LLM Application Scaffold",
    description="一个支持知识库聊天、工具调用和面试模拟的API平台",
    version="2.3.0",
)

app.add_middleware(
    CORSMiddleware,
    allow_origins=["*"],
    allow_credentials=True,
    allow_methods=["*"],
    allow_headers=["*"],
)

app.include_router(kb_chat.router, prefix="/api/kb_chat", tags=["知识库聊天"])
app.include_router(chat.router, prefix="/api/chat", tags=["智能聊天"])
app.include_router(interview.router, prefix="/api/interview", tags=["面试模拟"])
app.include_router(ipchat.router, prefix="/api/ipchat", tags=["自我介绍"])
app.include_router(resumeEvaluate.router, prefix="/api/resume", tags=["简历评估"])
app.include_router(intelligentInput.router, prefix="/api/intelligentInput", tags=["智能输入"])

app.include_router(Login.router, prefix="/api/Login", tags=["登录"])
app.include_router(jobMatch.router, prefix="/api/jobMatch", tags=["职位匹配"])
@app.get("/", tags=["健康检查"])

def read_root():
    return {
        "status": "ok",
        "message": "欢迎使用LLM应用脚手架API!",
        "available_endpoints": [
            "/api/kb_chat",
            "/api/chat",
            "/api/interview"
            "/api/ipchat"
            "/api/resumeEvaluate"
        ]
    }